package com.cq.base.activity

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding
import com.cq.base.utils.getViewBinding

/**
 * 作者: CQ
 * 日期: 2022-07-07
 * 说明:
 */
abstract class BaseViewBindingActivity<VB : ViewBinding> : AppCompatActivity() {
    protected val mBinding : VB by lazy(mode = LazyThreadSafetyMode.NONE) {
        getViewBinding(layoutInflater)
    }

    override fun onCreate(savedInstanceState : Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(mBinding.root)
        initView()
        initData()
    }

    open fun initData() {}

    open fun initView() {}
}